package com.ruoyi.algorithm.service;

import com.ruoyi.algorithm.entity.Operator;
import com.ruoyi.algorithm.model.ManufacturerOperatorDDBModel;
import com.ruoyi.algorithm.model.OperatorModel;
import com.ruoyi.algorithm.model.OperatorOnLineStateModel;
import com.beihu.sightplus.common.response.PageResult;

import java.util.List;

public interface OperatorService {
    /**
     * 新增
     */
    void add(Operator operator);

    /**
     * 修改
     */
    void update(Operator operator);

    /**
     * 删除
     */
    int delete(Long operatorId);

    /**
     * 上下线
     */
    void setOnlineState(OperatorOnLineStateModel operatorOnLineStateModel);

    /**
     * 查询算子详情信息
     */
    OperatorModel detail(Long operatorId);

    /**
     * 查询厂商和算子信息，支持根据算子名称
     */
    List<ManufacturerOperatorDDBModel> getManufacturerOperatorDDB(String operatorName);

    /**
     * 根据算子版本表id查询算子表
     *
     * @param operatorVersionId  算子版本id
     * @return 算子
     */
    Operator findByOperatorVersion(Long operatorVersionId);

    /**
     * 分页操作
     */
    PageResult pageList(String orderAttr, String orderType, Long current, Long size, OperatorModel operatorModel);

    /**
     * 切换算法绑定的算子版本号
     */
    void changeBindingOperatorVersion(Long operatorId, Long operatorVersionId);
}
